The history of Western Sahara can be traced back to the times of Carthaginian explorer Hanno the Navigator in the 5th century BC.
Though few historical records are left from that period, Western Sahara's modern history has its roots linked to some nomadic groups (living under
Berber tribal rule and in contact with the Roman Empire) such as the Sanhaja group, and the introduction of Islam and the Arabic language
at the end of the 8th century AD.
Western Sahara has never been a nation in the modern sense of the word. It was home to Phoenician colonies, but those disappeared with
virtually no trace.
Islam arrived there in the 8th century, but the region, beset with desertification, remained little developed. From the 11th to the 19th centuries,
Western Sahara was one of the links between the Sub-Saharan and North African regions. During the 11th century, the Sanhaja tribal confederation
allied with the Lamtuna tribe to found the Almoravid dynasty. The conquests of the Almoravids extended over present-day Morocco,
Western Algeria, and the Iberian peninsula to the north and Mauritania and Mali to the south, reaching the Ghana Empire.
While initial Spanish interest in the Sahara was focused on using it as a port for the slave trade, by the 1700s Spain had transitioned economic
activity on the Saharan coast towards commercial fishing.
After an agreement among the European colonial powers at the Berlin Conference in 1884 on the division of spheres of influence in Africa,
Spain seized control of Western Sahara and established it as a Spanish colony.
As time went by, Spanish colonial rule began to unravel with the general wave of decolonization after World War II; former North African and
sub-Saharan African possessions and protectorates gained independence from European powers. Spanish decolonization proceeded more slowly, but
internal political and social pressures for it in mainland Spain built up towards the end of Francisco Franco's rule. There was a global
trend towards complete decolonization. Spain began rapidly to divest itself of most of its remaining colonial possessions. By 1974–75 the government
issued promises of a referendum on independence in Western Sahara.
At the same time, Morocco and Mauritania, which had historical and competing claims of sovereignty over the territory, argued that
it had been artificially separated from their territories by the European colonial powers. Algeria, which also bordered the territory,
viewed their demands with suspicion, as Morocco also claimed the Algerian provinces of Tindouf and Béchar. After arguing for a process of
decolonization to be guided by the United Nations, the Algerian government under Houari Boumédiènne in 1975 committed to assisting
the Polisario Front, which opposed both Moroccan and Mauritanian claims and demanded full independence of Western Sahara.
The Moroccan and Mauritanian annexations initiated guerrilla warfare with the Polisario Front and in 1979, Mauritania withdrew due to pressure
from Polisario, including a bombardment of its capital and other economic targets.
Morocco extended its control to the rest of the territory. It gradually contained the guerrillas by setting up the extensive sand-berm in the desert
(known as the Border Wall) to exclude guerrilla fighters. Hostilities ceased in a 1991 cease-fire, overseen by the peacekeeping mission
MINURSO, under the terms of a UN Settlement Plan.
About 20% of the territory is controlled by the self-proclaimed Sahrawi Arab Democratic Republic, while the remaining 80% of the territory
is occupied and administered by neighboring Morocco. The United Nations considers it to be a "non-self-governing territory".
The referendum, originally scheduled for 1992, foresaw giving the local population the option between independence or affirming integration with Morocco,
but it quickly stalled.
As of 2010, negotiations over terms have not resulted in any substantive action. At the heart of the dispute lies the question of who qualifies
to be registered to participate in the referendum, and, since about the year 2000, Morocco considers that since there is no agreement on persons
entitled to vote, a referendum is not possible.
Meanwhile, Polisario still insisted on a referendum with independence as a clear option, without offering a solution to the problem of who is
ualified to be registered to participate in it.